]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
search: propagate GAppInfo to SearchProvider
authorCosimo Cecchi <cosimoc@gnome.org>
Thu, 1 Nov 2012 14:33:22 +0000 (10:33 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 19 Nov 2012 16:45:21 +0000 (11:45 -0500)
Save the GAppInfo in the provider object; this will be used when
filtering.

https://bugzilla.gnome.org/show_bug.cgi?id=687491

js/ui/remoteSearch.js
js/ui/search.js

index 58283d57af9d39beeeb07e4898a164cf0f8d49be..21e3d0f5c38aa064f55e65dd6007bfb98c0eafb7 100644 (file)
@@ -91,8 +91,7 @@ function loadRemoteSearchProvidersFromDir(dir, loadedProviders, addProviderCallb
                     continue;
                 }
 
-                remoteProvider = new RemoteSearchProvider(appInfo.get_name(),
-                                                          appInfo.get_icon(),
+                remoteProvider = new RemoteSearchProvider(appInfo,
                                                           busName,
                                                           objectPath);
                 loadedProviders[objectPath] = remoteProvider;
@@ -111,11 +110,11 @@ const RemoteSearchProvider = new Lang.Class({
     Name: 'RemoteSearchProvider',
     Extends: Search.SearchProvider,
 
-    _init: function(title, icon, dbusName, dbusPath) {
+    _init: function(appInfo, dbusName, dbusPath) {
         this._proxy = new SearchProviderProxy(Gio.DBus.session,
             dbusName, dbusPath, Lang.bind(this, this._onProxyConstructed));
 
-        this.parent(title.toUpperCase());
+        this.parent(appInfo.get_name().toUpperCase(), appInfo);
         this._cancellable = new Gio.Cancellable();
     },
 
index 22f53d9133890943bf7781d8bcafd7ae32c29409..f106e9160af3929e6cda1ee4926475924bb9a49b 100644 (file)
@@ -74,8 +74,9 @@ const SearchResultDisplay = new Lang.Class({
 const SearchProvider = new Lang.Class({
     Name: 'SearchProvider',
 
-    _init: function(title) {
+    _init: function(title, appInfo) {
         this.title = title;
+        this.appInfo = appInfo;
         this.searchSystem = null;
     },